<template>
  <div class="login">
    <div>用户登录表单 <button @click="handleLogin">登录</button></div>
  </div>
</template>

<script lang="ts" setup>
import { reactive } from 'vue'
import { login } from '../../api/user'

const user = reactive({
  username: '',
  password: '',
})

const handleLogin = async () => {
  const result = await login(user)
  console.log('登录结果:', result)
}
</script>

<style lang="less" scoped></style>
